Repository navigation
feat(editor): built-in agent with API key, models per task, and usage and privacy settings (#1030) - #1237
Open
houko wants to merge 1 commit into
Open
feat(editor): built-in agent with API key, models per task, and usage and privacy settings (#1030)#1237houko wants to merge 1 commit into
houko wants to merge 1 commit into
Conversation
houko
force-pushed
the
feat/editor-builtin-agent-models-usage-1030
branch
from
November 26, 2026 11:30
60241ac to
055fdab
Compare
houko
force-pushed
the
feat/editor-builtin-agent-models-usage-1030
branch
from
November 26, 2026 12:02
055fdab to
0498871
Compare
houko
force-pushed
the
feat/editor-builtin-agent-models-usage-1030
branch
3 times, most recently
from
November 26, 2026 12:41
9d7f49d to
5acc945
Compare
…sk routing, limit queueing, and failover (#1030)
houko
force-pushed
the
feat/editor-builtin-agent-models-usage-1030
branch
from
November 26, 2026 13:05
5acc945 to
5bfc414
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1030
Summary
cx.Secretsand editor MCP tools (packages/game/editor/agent_builtin.go,packages/game/editor/editormcp/server.go):Editor.BuiltInAgentEndpoint/Editor.BuiltInHTTPClient) using the editor's real MCP tools via the invertedAgentToolExecutorbridge wired automatically byeditormcp.New.editor.AgentAPIKeySecretAccount("agent.anthropic.api_key") via NSGo'score.Scope.Secrets()(backed by the OS keychain in production andnsgotest.Secretsin tests), never writing keys to project files,editor.yaml, or logs.packages/game/editor/settings_agent_ui.go,packages/game/editor/settings.go,packages/game/editor/settings_ui.go):AGENTsidebar group (Models and connections, Usage and privacy) styled withSpecPalettetokens in both Dark and Light appearances.scene_edit,playtest,problems,ask_in_place,art_sound) to connected local MCP agents or built-in Anthropic default/fast models, persisted in version-1EditorSettings(editor.yaml+ regeneratededitor-settings.v1.jsonschema).Limit reachedqueueing (packages/game/editor/agent_builtin.go,packages/game/editor/agent_ui.go):You onlyweekly request limit (refusing any agent attempt viaWithAgentActorwithErrAgentYouOnly), transitions the header chip toLimit reached · resets 00:00with a Usage link, and queues subsequent prompts until the weekly reset or until the person raises the limit.SceneAndData,ViewportImages,GoSource,ArtAndAudio) enforced on built-in tool calls and guarded byErrAgentYouOnly.429,5xx, and529overloaded errors on[4s, 8s, 16s, 32s]backoff (AgentModelRetryDelaysviaEditor.AgentScheduleAfter), rendering the model error card (Anthropic API is overloaded (529)·Retrying in 8 s · try 2 of 4) with Retry now and Use<connected agent>to switch that task kind's route and run the request on the alternative connected agent.docs/en/editor.md,docs/zh/editor.md,docs/en/formats.md,docs/zh/formats.md,packages/game/editor/locales/{en,zh}.yaml,apps/website/public/schemas/editor-settings.v1.json,changelog.d/editor-builtin-agent-models-usage-1030.md, and.agents/notes/implemented/feature/2026-11-26-editor-builtin-agent-models-usage.md.Verification
(cd packages/game && env -u GOROOT go run ./cmd/gameschema -check)(cd packages/game && env -u GOROOT go tool nsgo check ./editor && env -u GOROOT go tool nsgo check -target ios ./editor)(cd packages/game && env -u GOROOT go tool nsgo check ./editor/editormcp && env -u GOROOT go tool nsgo check -target ios ./editor/editormcp)(cd packages/game && env -u GOROOT go tool nsgo check ./editor/editorcmd && env -u GOROOT go tool nsgo check -target ios ./editor/editorcmd)(cd packages/game && env -u GOROOT go tool nsgo test . -run TestFormatsPage)(cd packages/game && env -u GOROOT go tool nsgo test ./editor/editormcp)(47 passed, includingTestBuiltInAgentEndToEndWithNSGoTestSecretsAndMCPTools)(cd packages/game && TMPDIR=/tmp env -u GOROOT go tool nsgo test ./editor -run 'TestLocaleCatalogsComplete|TestEditorSettings|TestSettings|TestConnectDialog|TestAgent|TestBuiltInAgent|TestModelsRouting|TestMatchSettingsPageQuery')(27 passed)(cd packages/game && TMPDIR=/tmp env -u GOROOT go tool nsgo test -target macos -run '^TestBuiltInAgentModelsAndUsageMacOSScreenshots$' ./editor/editorcmd)(all 6 real macOS screenshots visually inspected in Dark & Light themes)env -u GOROOT go run ./tools/changelog check&bun run verify-notes